package p2p.command;

import p2p.peer.client.Client;
import p2p.peer.client.ClientManager;

public class Spawn extends Command {

	public Spawn(String ip) {
		super(1, ip);
	}

	public Spawn(String ip, int port) {
		super(1, ip, port);
	}

	@Override
	public void execute() {

		ClientManager.getInstance().addClient(new Client(this.ip, this.port));

		this.listener.logPeerAction("new client with ip " + this.ip);

	}

}
